package com.yangxiangrice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yangxiangrice.mapper.UserListMapper;
import com.yangxiangrice.pojo.UserList;
import com.yangxiangrice.service.UserListService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: TODO
 * @author: shixiaojian
 * @date: 2021年11月16日 16:44
 */
@Service
public class UserListServiceImpl extends ServiceImpl<UserListMapper, UserList> implements UserListService {
    @Autowired
    UserListMapper userListMapper;

    @Override
    public Boolean changePwd(Integer userId, String passwd, String salt) {
        return userListMapper.changePwd(userId, passwd, salt);
    }

    @Override
    public IPage<UserList> seletePage(IPage<UserList> page, QueryWrapper wrapper) {
        return userListMapper.selectPage(page, wrapper);
    }

    @Override
    public Integer getAdminNum() {
        return userListMapper.getAdminNum();
    }

    @Override
    public Integer getFarmerNum() {
        return userListMapper.getFarmerNum();
    }
}
